projects
/
babl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65275ec
)
babl: return the linear TRC when 1.0 is asked for numerically
author
Øyvind Kolås
<pippin@gimp.org>
Sat, 19 Aug 2017 01:53:16 +0000
(
03:53
+0200)
committer
Øyvind Kolås
<pippin@gimp.org>
Sat, 19 Aug 2017 01:53:16 +0000
(
03:53
+0200)
babl/babl-trc.c
patch
|
blob
|
history
diff --git
a/babl/babl-trc.c
b/babl/babl-trc.c
index c1bc10714cc744e9f6a47c6e8ca71e1d9757580d..9f8cb5802196ef8842891528ef8927d1087a74d5 100644
(file)
--- a/
babl/babl-trc.c
+++ b/
babl/babl-trc.c
@@
-89,6
+89,8
@@
babl_trc_gamma (double gamma)
{
char name[32];
int i;
+ if (fabs (gamma - 1.0) < 0.0001)
+ return babl_trc_new ("linear", BABL_TRC_LINEAR, 1.0);
sprintf (name, "%.6f", gamma);
for (i = 0; name[i]; i++)
if (name[i] == ',') name[i] = '.';